package com.docking.heylo.pojo;


import java.util.Objects;

public class Aperture {


    private SimpleUser  userInfo;
    private SimplePost  postInfo;

    /**
     * 喜欢
     */

    private int         like;

    /***
     * 距离
     */
    private double  distance = 10;


    public SimpleUser getUserInfo() {
        return userInfo;
    }

    public void setUserInfo(SimpleUser userInfo) {
        this.userInfo = userInfo;
    }

    public SimplePost getPostInfo() {
        return postInfo;
    }

    public void setPostInfo(SimplePost postInfo) {
        this.postInfo = postInfo;
    }

    public double getDistance() {
        return distance;
    }

    public void setDistance(double distance) {
        this.distance = distance;
    }

    public int getLike() {
        return like;
    }

    public void setLike(int like) {
        this.like = like;
    }

    @Override
    public boolean equals(Object o) {
       return this.postInfo.getPostId() == ((Aperture)o).getPostInfo().getPostId();
    }

    @Override
    public int hashCode() {
        return Objects.hash(this.postInfo);
    }


}
